{% extends "base.html" %}

{% block content %}

<div class="grid_16">
{% set params as ['current_page': request.page, 'page_size': 2] %}
{% call 'social.post.list' with params as posts %}

    <div class="comment-list">

<a href="{% url 'blog/post/add' %}">Add new post</a>

{% for key, post in posts.data %}
    <div class="comment {{ ['odd', 'even']|cycle(key) }}">

        <div class="comment-gravatar left">
            <img alt="" src="{{ url.resource }}/img/avatar.png" height="32" width="32" />
        </div>

        <div class="comment-author left">
            <a href="{% url 'blog/post/view' with ['post_id': post.post_id] %}">{{ post.title }}</a>
            <div class="comment-date"><a href="#">2010-02-02 18:20:23</a></div>
        </div>

        <div class="clearer">&nbsp;</div>

        <div class="comment-body">
            <p>{{ post.content }}</p>
        </div>

    </div>
{% else %}
    <div class="comment alt">
        Application not found.
    </div>
{% endfor %}

{% include 'pager.html' with ['pager': posts.pager, 'router': 'blog/posts'] %}

<pre style="display:none;">
{% debug %}
</pre>

</div> <!-- End .grid_6 -->

{% endblock %}
